package com.it.demo013;

import java.util.concurrent.ArrayBlockingQueue;

public class Cooker extends  Thread{
    private ArrayBlockingQueue<String> list;
   public Cooker(ArrayBlockingQueue<String> list) {
        this.list = list;

    }

    @Override
    public void run() {
       while (true){
           try {
               list.put("老八秘制");
               System.out.println("老八做了一个汉堡包");
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }

    }
}
